package com.rui.study.algorithm.L_深入理解JVM_JIT编译演示;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2019-03-04 11:32
 **/
public class Test {

    public static final int NUM = 15000;

    public static int doubleVal(int i) {
        for (int j = 0; j < 10_000; j++);
        return i * 2;
    }

    public static int calcSum() {
        int sum = 0;
        for (int i = 0; i < 100; i++) {
            sum += doubleVal(i);
        }
        return sum;
    }

    public static void main(String[] args) {
        for (int i = 0; i < NUM; i++) {
            calcSum();

        }
    }
}
